{include file="common/top" /}
<link  type="text/css" href="__static/ossupload/style.css"/>
<style>
html{
	background: #ffffff;
}
</style>

<form class="layui-form " action="" style="    background: #fff;">
	
	<table class="layui-table">
        <tbody>
          <tr>
            <td style="width:13%">转出账户ID：</td>
            <td style="width:25%">{$rs['out_name_id']}</td>
            <td style="width:15%">转出账户币：</td>
            <td >{$rs['out_currency']}</td>
          </tr>
          <tr>
            <td style="width:13%">转入账户ID：</td>
            <td style="width:25%">{$rs['in_name_id']}</td>
            <td style="width:15%">转入账户币：</td>
            <td >{$rs['in_currency']}</td>
          </tr>
          <tr>
            <td style="width:15%">客户返点：</td>
            <td >{$rs.rebate}%</td>
            <td style="width:15%">端口返点：</td>
            <td >{$rs.channel_rebate}%</td>
          </tr>
        </tbody>
    </table>
	
	
	<div class="layui-form-item">
        <label class="layui-form-label">上传凭证：</label>
        <div class="layui-col-xs4">
            <div class="layui-upload-drag" id="test10">
                  <i class="layui-icon"></i>
                  <p>点击上传，或将文件拖拽到此处</p>
                  <div class="layui-hide" id="uploadDemoView">
                      <hr>
                    <img src="" alt="上传成功后渲染" style="max-width: 196px">
                  </div>
            </div>
        </div>
    </div>
	<hr />
	<div class="layui-form-item">
		<div class="layui-input-block">
			<input type="hidden"  name="id" value="{$rs.id}">
			<input type="hidden"  name="audit_url" value="">
			<button class="layui-btn"  lay-submit="" lay-filter="demo1">提交</button>
		</div>
	</div>
	
</form>
{include file="common/footer" /}
<script>
	layui.use(['form', 'layedit', 'laydate','upload'], function(){
		  var form = layui.form ,layer = layui.layer,upload = layui.upload,$ = layui.jquery;
		  //监听提交
		  form.on('submit(demo1)', function(data){
			var articleFrom = data.field;
			layer.load(1, { shade : [ 0.5, '#676a6c' ] }); 
			$.post("{:url('qr_transfer')}?t=json",articleFrom,function(data){
				layer.closeAll();
				if (data['code'] == 1) { 
					var index1 = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
					parent.layer.close(index1); //再执行关闭 
					//父页面数据 ，重新加载
					parent.get_acc(data['msg']);
				} else {
					layer.msg(data['msg'], { icon : 5 });
				}
			});
			return false;
		  });
		//拖拽上传
		upload.render({
		    elem: '#test10'
		    ,url: '{:url("Upload/index")}' //改成您自己的上传接口
		    ,exts: 'jpg|png|jpeg|gif'
	    	,choose: function(obj){
	    		layer.load(1, { shade : [ 0.5, '#676a6c' ] });
	    	}
		    ,done: function(res){
		    	layer.closeAll();
		    	if(res.code == 0){
		    		layer.msg('上传成功');
				    layui.$('#uploadDemoView').removeClass('layui-hide').find('img').attr('src', res.data);
				    $("input[name=audit_url]").val(res.data);
		    	}else{
		    		layer.msg(res.msg);
		    	}
		      
		      //console.log(res)
		    }
		  });
		  
		});
	
	
</script>
